﻿<%@ Page Language="C#" MasterPageFile="~/AdminMain.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
    Inherits="BitlockerRecovery.AdminDefault"%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminContentPlaceholder" runat="server">
    <asp:MultiView runat="server" ActiveViewIndex="0" ID="SearchMultiview">
        <asp:View ID="ViewSearch" runat="server">
            <asp:Label ID="InfoRequestText" CssClass="InfoLabel" runat="server">Enter first 8 characters of the Recovery Key ID, machine name or machine owner to search by.</asp:Label><br /><br />
            <asp:TextBox CssClass="InputTextBox" ID="SearchValue" runat="server"
                MaxLength="50"></asp:TextBox>
            <br /><br />
            <asp:Label ID="InfoRequestedFor" CssClass="InfoLabel" runat="server">Requested For (Domain\alias)</asp:Label><br /><br />
            <asp:TextBox CssClass="InputTextBox" ID="RequestedFor" runat="server" MaxLength="50"></asp:TextBox><br /><br />
            <asp:Button ID="SubmitButton" CssClass="SubmitButton" OnClick="ViewSearchSubmit_OnClick" Text="Submit"
                runat="server" />
            <br />
            <asp:Label ID="LabelMessage" runat="server"></asp:Label>
            <asp:RegularExpressionValidator ID="RegexValidGUID" runat="server" ControlToValidate="SearchValue"
                SetFocusOnError="true" ErrorMessage="Invalid Input: Search parameter." ValidationExpression="^([a-zA-Z0-9_-]+)$"
                Display="None"></asp:RegularExpressionValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="RequestedFor"
                SetFocusOnError="true" ErrorMessage="Invalid Input: Requested For." ValidationExpression="^[a-zA-Z]+\\[a-zA-Z-]+$"
                Display="None"></asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="RequestedFor"
                SetFocusOnError="true" ErrorMessage="Requested For is a required field" Display="None"></asp:RequiredFieldValidator>
            <asp:RequiredFieldValidator ID="RequiredGUID" runat="server" ControlToValidate="SearchValue"
                SetFocusOnError="true" ErrorMessage="Please enter a search paramter." Display="None"></asp:RequiredFieldValidator>
            <asp:ValidationSummary runat="server" HeaderText="Please correct the following:"
                ShowMessageBox="true" ID="AllValidations" ShowSummary="false" DisplayMode="BulletList" />
        </asp:View>
        <asp:View ID="ResultsView" runat="server">
            <table>
                <thead class="TableHeader">
                    <tr>
                        <td>
                            Results
                        </td>
                    </tr>
                </thead>
                <tr>
                    <td>
                        <asp:GridView ID="Results" runat="server" EmptyDataText="No records found." EnableSortingAndPagingCallbacks="true"
                            AutoGenerateColumns="false">
                            <AlternatingRowStyle BackColor="Beige" />
                            <Columns>
                                <asp:BoundField HeaderText="Machine Name" DataField="MachineName" ReadOnly="true" />
                                <asp:BoundField HeaderText="Machine Owner" DataField="Owner" ReadOnly="true" />
                                <asp:BoundField HeaderText="Recovery Key ID" DataField="RecoveryGUID" ReadOnly="true" />
                                <asp:BoundField HeaderText="Recovery Password" DataField="RecoveryPasswordString" ReadOnly="true" />
                                <asp:BoundField HeaderText="Volume GUID" DataField="VolumeGUID" ReadOnly="true" />
                                <asp:BoundField HeaderText="Time Stamp" DataField="TimeStamp" ReadOnly="true" />
                           </Columns>
                        </asp:GridView>
                        <asp:DetailsView ID="DetailViewResult" runat="server">
                        </asp:DetailsView>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="BackButton" Text="Back" runat="server" OnClick="Back_OnClick" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="InfoInstructions" CssClass="InfoLabel" runat="server">For more information on how to use this data, please see the <asp:literal id="FaqLink" runat="server" Text="Faq"></asp:literal>.</asp:Label>
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
</asp:Content>
